<?php
function smarty_block_arclist($params, $content, &$smarty)
{
    $cid = $params["cid"];//班级
    $row = $params["row"];//条数
    $sql = "SELECT * FROM stu WHERE cid =$cid  LIMIT $row";
    $stu= query($sql);
    $str="";
    foreach($stu as $s){
        $c = $content;
        foreach($s as $fieldName =>$n){
            $c=str_replace('[$field.'.$fieldName.']',$n,$c); 
        }
        $str.=$c;
    }
    return $str;
}

?>
